import { createRouter, createWebHistory } from 'vue-router'

// 懒加载组件
const Home = () => import('../components/Home.vue')
const My = () => import('../components/My.vue')
const Bill = () => import('../components/Bill.vue')
const Services = () => import('../components/Services.vue')
const Center = () => import('../components/Center.vue')
const routes = [
  { path: '/', name: 'Home', component: Home },
  { path: '/my', name: 'My', component: My },
  { path: '/bill', name: 'Bill', component: Bill ,meta: { needLoading: true }},
  { path: '/services', name: 'Services', component: Services },
  { path: '/center', name: 'Center', component: Center,meta: { needLoading: true } },
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router